package com.autumn.platform.dao.schema.function.impl;

import org.apache.ibatis.session.Configuration;

public abstract class AbstractDatabaseIdSqlConfigFunction extends AbstractSqlConfigFunction {

    @Override
    public String eval(Configuration configuration, String[] args) {
        String databaseId = configuration.getDatabaseId();
        return this.eval(null == databaseId ? null : databaseId.toLowerCase(), args);
    }

    protected abstract String eval(String databaseId, String[] args);
}
